// 书写首页的 css 样式

// 导入公共的 common.less 文件
@import "common";

// body 的样式
body {
  min-width: 320px;
  width: 15rem;
  margin: 0 auto;
  line-height: 1.5;
  font-family: Arial,Helvetica,STHeiTi,sans-serif;
  background: #F2F2F2;
}

ul,ol {
  list-style: none;
}
// 后续的尺寸都需要使用 rem 单位
@baseFont: 50px;
// top-banner 区域
.top-banner {
  position: relative;
  width: (750rem / @baseFont);
  height: (100rem / @baseFont);
  .top-banner-img {
    display: block;
    width: 100%;
    height: 100%;
    img {
      display: block;
      width: 100%;
      height: 100%;
    }
  }
  .close {
    position: absolute;
    left: 0.1rem;
    top: 0.5rem;
    width: (50rem / @baseFont);
    height: (50rem / @baseFont);
    background: url(../images/close.png) no-repeat center center;
    background-size: (30rem / @baseFont) auto;
  }
}

// header 区域
.header {
  width: (750rem / @baseFont);
  height: (180rem / @baseFont);
  background-color: #ffdb47;
  .header-top {
    display: flex;
     width: (682rem / @baseFont);
     height: (88rem / @baseFont);
     padding: 0 (34rem / @baseFont);
     justify-content: space-between;
     align-items: center;
     .classify {
       img {
        display: block;
        width: (36rem / @baseFont);
        height: (60rem / @baseFont);
       }
     }
     .ad {
       img {
          display: block;
          width: (450rem / @baseFont);
          height: (55rem / @baseFont);
          margin-right: (50rem / @baseFont);
       }
     }
     .login {
      img {
       display: block;
       width: (36rem / @baseFont);
       height: (60rem / @baseFont);
      }
    }
  }
  .search {
    position: relative;
    width: (750rem / @baseFont);
    height: (92rem / @baseFont);
    padding: 0 (24rem / @baseFont);
    box-sizing: border-box;
    a {
      position: absolute;
      top: 0;
      left: (24rem / @baseFont);
      width: (702rem / @baseFont);
      height: (88rem / @baseFont);
    }
    i {
      position: absolute;
      left: (42rem / @baseFont);
      top: (26rem / @baseFont);
      width: (36rem / @baseFont);
      height: (36rem / @baseFont);
      background: url(../images/search_btn.png) no-repeat 0 0;
      background-size: (36rem / @baseFont);
    }
    form {
      display: flex;
      width: (702rem / @baseFont);
      height: (88rem / @baseFont);
      align-items: center;
      input {
        width: (702rem / @baseFont);
        height: (64rem / @baseFont);
        padding: (3rem / @baseFont) (20rem / @baseFont) 0 (65rem / @baseFont);
        border: 0;
        border-radius: (32rem / @baseFont);
        box-sizing: border-box;
        font-size: 0.56rem;
        line-height: (64rem / @baseFont);
      }
    }
  }
}

//banner 区域
.banner {
  width: (750rem / @baseFont);
  height: (260rem / @baseFont);
  background: url(../images/banner_bg.png) no-repeat;
  background-size: (750rem / @baseFont) auto;
  .wrapper {
    position: relative;
    width: (702rem / @baseFont);
    height: (260rem / @baseFont);
    margin: 0 auto;
    overflow: hidden;
    ul {
      position: relative;
      width: (2000rem / @baseFont);
      height: (260rem / @baseFont);
      margin: 0;
      li {
        position: absolute;
        left: (702rem / @baseFont);
        top: 0;
        width: (702rem / @baseFont);
        height: (260rem / @baseFont);
        border-radius: (24rem / @baseFont);
        overflow: hidden;
        &.current {
          left: 0;
        }
        img {
          width: (702rem / @baseFont);
          height: (260rem / @baseFont);
        }
      }
    }
    ol {
      position: absolute;
      left: (230rem / @baseFont);
      bottom: 0.24rem;
      width: (208rem / @baseFont);
      height: (8rem / @baseFont);
      margin: 0;
      text-align: center;
      li {
        float: left;
        width: (9rem / @baseFont);
        height: (8rem / @baseFont);
        margin: 0 (9rem / @baseFont);
        border-radius: 0.16rem;
        background-color: rgba(0, 0, 0, 0.24);
        &.current-li {
          width: 0.36rem;
          background-color: #fff;
        }
      }
    }
  }
}

// 优惠券区域
.coupon {
  width: 100;
  overflow: hidden;
  a {
    float: left;
    width: 33.333%;
    img {
      display: block;
      width: 100%;
    }
  }
}

// nav 部分
.nav {
  width: (750rem / @baseFont);
  height: (308rem / @baseFont);
  a {
    float: left;
    width: (150rem / @baseFont);
    height: (142rem / @baseFont);
    text-decoration: none;
    color: #666666;
    font-size: (22rem / @baseFont);
    img {
      display: block;
      width: (84rem / @baseFont);
      height: (84rem / @baseFont);
      margin: (24rem / @baseFont) (33rem / @baseFont) 0;
    }
    p {
      height: (28rem / @baseFont);
      margin-top: (5rem / @baseFont);
      line-height: (28rem / @baseFont);
      text-align: center;
    }
  }
}

// 新人优惠区域
.coupon-new {
  width: (750rem / @baseFont);
  height: (234rem / @baseFont);
  margin: 0.48rem auto 0;
 .coupon-and-new {
   display: flex;
   a:nth-child(1) {
     display: block;
     flex: 2;
     img {
      display: block;
      width: (373.5rem / @baseFont);
      height: (234rem / @baseFont);
     }
   }
   a:nth-child(n+2) {
     flex: 1;
     img {
       display: block;
       width: (186.25rem / @baseFont);
       height: (234rem / @baseFont);
     }
   }
 }
}
.box {
  width: (750rem / @baseFont);
  height: (24rem / @baseFont);
  margin: 0 auto;
}

// 秒杀商品区
.shopping {
  display: flex;
  width: (702rem / @baseFont);
  height: (258rem / @baseFont);
  margin: 0 auto;
  overflow: hidden;
  .shopping-left {
    width: (350rem / @baseFont);
    height: (258rem / @baseFont);
    background-color: #fff;
    .title {
      display: flex;
      width: (350rem / @baseFont);
      height: (58rem / @baseFont);
      overflow: hidden;
      justify-content: start;
      align-items: flex-end;
      .title-h {
        width: (112rem / @baseFont);
        height: (40rem / @baseFont);
        font-size: (28rem / @baseFont);
        font-weight: 700;
        line-height: (40rem / @baseFont);
        margin: (18rem / @baseFont) (8rem / @baseFont) 0 (24rem / @baseFont);
        color: #333;
        overflow: hidden;
      }
      .title-time {
        // width: (131rem / @baseFont);
        height: (40rem / @baseFont);
        color: #333;
        background-color: pink;
        span {
          display: inline-block;
          width: (34rem / @baseFont);
          height: (28rem / @baseFont);
          font-size: (20rem / @baseFont);
          color: #333;
          vertical-align: middle;
          margin: 0 (2.5rem / @baseFont);
          line-height: (28rem / @baseFont);
          text-align: center;
          background-color: #ffcc00;
          border-radius: 0.18rem;
          font-weight: bold;
        }
        i {
          width: (7rem / @baseFont);
          height: (27rem / @baseFont);
        }
      }
    }
    .text {
      width: (300rem / @baseFont);
      height: (30rem / @baseFont);
      font-size: (24rem / @baseFont);
      color: #999;
      line-height: (30rem / @baseFont);
      margin: (4rem / @baseFont) 0 0 (24rem / @baseFont);
      margin-top: 0.08rem;
      overflow: hidden;
    }
    ul {
      display: flex;
      width: (250rem / @baseFont);
      height: (149rem / @baseFont);
      margin: (5rem / @baseFont) 0 0;
      padding: 0 0 0 (28rem / @baseFont);
      .li-left {
        position: relative;
        width: (120rem / @baseFont);
        height: (149rem / @baseFont);
        margin-right: 1.1rem;
        img {
          width: (120rem / @baseFont);
          height: (120rem / @baseFont);
        }
        .p {
          position: absolute;
          bottom: (-40rem / @baseFont);
          left: 0;
          width: (120rem / @baseFont);
          height: (28rem / @baseFont);
          margin-top: (1rem / @baseFont);
          line-height: (28rem / @baseFont);
          span:nth-child(1) {
            width: (12rem / @baseFont);
            height: (25rem / @baseFont);
            color: #ff5500;
            font-size: (22rem / @baseFont);
          }
          span:nth-child(2) {
            width: (28rem / @baseFont);
            height: (31rem / @baseFont);
            color: #ff5500;
            font-size: (26rem / @baseFont);
          }
          span:nth-child(3) {
            width: (18rem / @baseFont);
            height: (25rem / @baseFont);
            color: #ff5500;
            font-size: (22rem / @baseFont);
          }
        }
      }
      .li-right {
        position: relative;
        width: (120rem / @baseFont);
        height: (149rem / @baseFont);
        img {
          width: (120rem / @baseFont);
          height: (120rem / @baseFont);
        }
        .p {
          position: absolute;
          bottom: (-40rem / @baseFont);
          left: 0;
          width: (120rem / @baseFont);
          height: (28rem / @baseFont);
          margin-top: (1rem / @baseFont);
          line-height: (28rem / @baseFont);
          span:nth-child(1) {
            width: (12rem / @baseFont);
            height: (25rem / @baseFont);
            color: #ff5500;
            font-size: (22rem / @baseFont);
          }
          span:nth-child(2) {
            width: (28rem / @baseFont);
            height: (31rem / @baseFont);
            color: #ff5500;
            font-size: (26rem / @baseFont);
          }
          span:nth-child(3) {
            width: (18rem / @baseFont);
            height: (25rem / @baseFont);
            color: #ff5500;
            font-size: (22rem / @baseFont);
          }
        }
      }
    }
  }
  .border-line {
    width: 1px;
    height: 100%;
    line-height: 0;
    background: #f2f2f2;
  }
  .shopping-right {
    position: relative;
    width: (350rem / @baseFont);
    height: (258rem / @baseFont);
    background-color: #fff;
    .title {
      display: flex;
      width: (350rem / @baseFont);
      height: (58rem / @baseFont);
      overflow: hidden;
      justify-content: start;
      align-items: flex-end;
      .title-h {
        width: (112rem / @baseFont);
        height: (40rem / @baseFont);
        font-size: (28rem / @baseFont);
        font-weight: 700;
        line-height: (40rem / @baseFont);
        margin: (18rem / @baseFont) (8rem / @baseFont) 0 (24rem / @baseFont);
        color: #333;
        overflow: hidden;
      }
    }
    .text {
      width: (300rem / @baseFont);
      height: (30rem / @baseFont);
      font-size: (24rem / @baseFont);
      color: #999;
      line-height: (30rem / @baseFont);
      margin: (4rem / @baseFont) 0 0 (24rem / @baseFont);
      margin-top: 0.08rem;
      overflow: hidden;
    }
    .a {
      position: absolute;
      top: 1.96rem;
      left: .48rem;
      display: block;
      width: (140rem / @baseFont);
      height: (160rem / @baseFont);
      img {
        display: block;
        width: (120rem / @baseFont);
        height: (120rem / @baseFont);
        margin: 0 (10rem / @baseFont);
      }
      p {
        position: absolute;
        bottom: 0.16rem;
        left: -0.1rem;
        box-sizing: border-box;
        width: (150rem / @baseFont);
        height: (54rem / @baseFont);
        font-size: (20rem / @baseFont);
        color: #333;
        padding-top: (22rem / @baseFont);
        background: url(../images/bj.png) no-repeat;
        background-size: 3rem 1.08rem;
        line-height: 0.64rem;
        overflow: hidden;
        text-align: center;
        margin: 0;
      }
    }
    .a.b {
      left: 3.72rem;
    }
  }
}
.border-line-bottom {
  width: 14.04rem;
  height: 1px;
  margin: 0 auto;
  background: #f2f2f2;
}
.shopping-bottom {
  display: flex;
  width: (702rem / @baseFont);
  height: (172rem / @baseFont);
  background-color:#fff;
  overflow: hidden;
  margin: 0 auto;
  .bottom-left {
    width: (173rem / @baseFont);
    height: (172rem / @baseFont);
    box-sizing: border-box;
    padding: (47rem / @baseFont) (18rem / @baseFont) 0;
    .left-a {
      text-decoration: none;
      .a-p {
        width: (137rem / @baseFont);
        height: (45rem / @baseFont);
        color: #444;
        line-height: 0.9rem;
        font-size: (32rem / @baseFont);
        font-weight: bold;
        margin: 0;
      }
      .a-p-p {
        width: (137rem / @baseFont);
        height: (32rem / @baseFont);
        color: #999;
        line-height: 0.48rem;
        font-size: (24rem / @baseFont);
        margin: 0;
      }
    }
  }
  .four {
    display: flex;
    width: (508rem / @baseFont);
    height: (172rem / @baseFont);
    justify-content: space-between;
    .four-box {
      position: relative;
      width: (120rem / @baseFont);
      height: (170rem / @baseFont);
      box-sizing: border-box;
      .box-a {
        display: block;
        width: 100%;
        height: 100%;
        text-decoration: none;
        img {
          position: absolute;
          top: .36rem;
          left: .2rem;
          width: (100rem / @baseFont); 
          height: (100rem / @baseFont);
        }
        p {
          position: absolute;
          top: 2.48rem;
          left: 0;
          width: (120rem / @baseFont);
          height: (30rem / @baseFont);
          color: #333;
          font-size: (22rem / @baseFont);
          line-height: (22rem / @baseFont);
          text-align: center;
          margin: 0;
        }
      }
    }
  }
}

// 爆款抢购区
.bao {
  display: flex;
  width: (750rem / @baseFont);
  a {
    text-decoration: none;
    img {
      width: (750rem / @baseFont);
      height: (199rem / @baseFont);
    }
  }
}

// 底部固定区域
.foot {
  box-sizing: content-box;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  width: 15rem;
  height: 2rem;
  z-index: 199;
  border-top: 1px solid #EEE;
  background: #FFF;
  transition: all .2s linear;
  a {
    position: relative;
    float: left;
    display: block;
    width: 3rem;
    height: 2rem;
    background: #fff;
    text-decoration: none;
    img {
      display: block;
      width: .96rem;
      height: .96rem;
      margin: .24rem auto 0;
    }
    span {
      display: block;
      font-size: 0.4rem;
      line-height: .64rem;
      color: #666;
      text-align: center;
    }
  }
}

// 底部固定登录区域
.into {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  width: 15rem;
  margin-left: -7.5rem;
  height: 1.8rem; 
  a {
    display: block;
    img {
      width: 15rem;
      height: 1.8rem;
    }
  }
}